package com.alks.function.controller.pcFactoryQuery;

import com.alks.common.aop.ApiRestController;
import com.alks.common.aop.RoleCheck;
import com.alks.common.aop.WebLogger;
import com.alks.entity.data.response.ResponseInfo;
import com.alks.function.data.request.factoryquery.PartBfOutRequest;
import com.alks.function.service.pcfactoryquery.IPcSlipDetailPartBfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@ApiRestController("/pcFactorQuery")
@Api(value = "总经办", tags = "总经办-工厂查询模块-耗品出库查询")
@Slf4j
@RoleCheck(prgIds = {"100413", "150210", "160211", "180711", "170510"})
public class PartMtlOutController {
    @Autowired
    private IPcSlipDetailPartBfService partBfService;

    @PutMapping("/queryPartBfOut")
    @ApiOperation(value = "耗品出库-耗品出库明细-条件可分页查询", tags = "总经办-工厂查询模块-耗品出库查询")
    @WebLogger
    public ResponseInfo queryPartBfOut(@RequestBody PartBfOutRequest request) {
        return partBfService.queryPartBfOut(request);
    }

    @GetMapping("/queryPartBfOutBack")
    @ApiOperation(value = "耗品出库-耗品出库-回表查询", tags = "总经办-工厂查询模块-耗品出库查询")
    @WebLogger
    public ResponseInfo queryPartBfOutBack() {
        return partBfService.queryPartBfOutBack();
    }

}
